//package p.ithorns.sample;
//
//import io.swagger.annotations.ApiOperation;
//import org.springframework.context.annotation.Bean;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.builders.RequestParameterBuilder;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.service.ParameterType;
//import springfox.documentation.service.RequestParameter;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * SwaggerConfig
// *
// * @author HtL
// * @date 2024/7/22 16:11
// * @since 1.0.0
// */
////@EnableSwagger2
////@Configuration
//public class SwaggerConfig {
//
//    @Bean
//    public Docket docket() {
//        RequestParameterBuilder parameterBuilder = new RequestParameterBuilder();
//        List<RequestParameter> parameters = new ArrayList<>();
//        parameterBuilder.name("test")
//                .description("token值")
//                .in(ParameterType.HEADER)
//                .required(true)
//                .build();
//        parameters.add(parameterBuilder.build());
//        return new Docket(DocumentationType.OAS_30)
//                .apiInfo(apiInfo())
//                .enable(true)//开启Swagger文档
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("com.test") )
//                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
//                .paths(PathSelectors.any())
//                .build()
//                .globalRequestParameters(parameters);
//    }
//
//    public ApiInfo apiInfo() {
//        return new ApiInfoBuilder()
//                .title("test")
//                .description("test")
//                .contact(new Contact("test", "test", "test@test.com"))
//                .version("1.0")
//                .build();
//    }
//
//}